import * as types from './mutattion_types'

export const setVimNum = ({
  commit
}, VimNum) => {
  commit(types.SET_VIMNUM, VimNum)
}

export const setVimBaseData = ({
  commit
}, VimBaseData) => {
  commit(types.SET_VIMBASEDATA, VimBaseData)
}

export const setVimOldData = ({
  commit
}, VimOldData) => {
  commit(types.SET_VIMOLDDATA, VimOldData)
}

export const setVimChangedCcw = ({
  commit
}, VimChanged) => {
  commit(types.SET_VIMCHANGEDCCW, VimChanged)
}

export const setVimChangedCth = ({
  commit
}, VimChanged) => {
  commit(types.SET_VIMCHANGEDCTH, VimChanged)
}

export const setVimChangedEscf = ({
  commit
}, VimChanged) => {
  commit(types.SET_VIMCHANGEDESCF, VimChanged)
}

// 查询结果存储
export const setCCWEvaluteRsult = ({
  commit
}, CCWEvaluteRsult) => {
  commit(types.SET_CCWEVALUTERSULT, CCWEvaluteRsult)
}


export const setCTHEvaluteRsult = ({
  commit
}, CTHEvaluteRsult) => {
  commit(types.SET_CTHEVALUTERSULT, CTHEvaluteRsult)
}


export const setESCFEvaluteRsult = ({
  commit
}, ESCFEvaluteRsult) => {
  commit(types.SET_ESCFEVALUTERSULT, ESCFEvaluteRsult)
}

// 查询结果重置
export const setCCWEvaluteRsultToNull = ({
  commit
}, CCWEvaluteRsult) => {
  commit(types.SET_CCWEVALUTERSULT, {
    error: true
  })
}

export const setCTHEvaluteRsultToNull = ({
  commit
}, CTHEvaluteRsult) => {
  commit(types.SET_CTHEVALUTERSULT, {
    error: true
  })
}

export const setESCFEvaluteRsultToNull = ({
  commit
}, ESCFEvaluteRsult) => {
  commit(types.SET_ESCFEVALUTERSULT, {
    error: true
  })
}

//查询数据存储新
export const setCcwCondition = ({
  commit
}, ccwCondition) => {
  commit(types.SET_CCWCONDITION, ccwCondition)
}
export const setCthCondition = ({
  commit
}, cthCondition) => {
  commit(types.SET_CTHCONDITION, cthCondition)
}
export const setEscfCondition = ({
  commit
}, escfCondition) => {
  commit(types.SET_ESCFCONDITION, escfCondition)
}
export const setCommonCondition = ({
  commit
}, commonCondition) => {
  commit(types.SET_COMMONCONDITION, commonCondition)
}

export const setCcwConditionToNull = ({
  commit
}, ccwCondition) => {
  commit(types.SET_CCWCONDITION, {
    type: '',
    curSimleTime: '',
    curSelect: '',
    curChildSelect: '',
    curModels: ''
  })
}
export const setCthConditionToNull = ({
  commit
}, cthCondition) => {
  commit(types.SET_CTHCONDITION, {
    type: '',
    curSimleTime: '',
    curSelect: '',
    curChildSelect: '',
    curModels: ''
  })
}
export const setEscfConditionToNull = ({
  commit
}, escfCondition) => {
  commit(types.SET_ESCFCONDITION, {
    type: '',
    curSimleTime: '',
    curSelect: '',
    curChildSelect: '',
    curModels: ''
  })
}
export const setCommonConditioToNull = ({
  commit
}, commonCondition) => {
  commit(types.SET_COMMONCONDITION, {
    ccwProvinceSelect: '',
    ccwCitySelect: '',
    cthProvinceSelect: '',
    cthCitySelect: '',
    escfProvinceSelect: '',
    escfCitySelect: '',
    distance: '',
    selectedMonth: '',
    selectedYear: ''
  })
}

// 品牌列表
export const setCcwPPList = ({
  commit
}, ccwPPList) => {
  commit(types.SET_CCWPPLIST, ccwPPList)
}
export const setCthPPList = ({
  commit
}, cthPPList) => {
  commit(types.SET_CTHPPLIST, cthPPList)
}
export const setEscfPPList = ({
  commit
}, escfPPList) => {
  commit(types.SET_ESCFPPLIST, escfPPList)
}